using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._AnalysisTools._PairwiseOverlay
{
    /// <summary>
    /// <para>Pairwise Dissolve</para>
    /// <para>Aggregates features based on specified attributes using a parallel processing approach.</para>
    /// <para>使用并行处理方法基于指定属性聚合要素。</para>
    /// </summary>    
    [DisplayName("Pairwise Dissolve")]
    public class PairwiseDissolve : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PairwiseDissolve()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The features to be aggregated.</para>
        /// <para>要聚合的要素。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The feature class to be created that will contain the aggregated features.</para>
        /// <para>要创建的要素类，该要素类将包含聚合要素。</para>
        /// </param>
        public PairwiseDissolve(object _in_features, object _out_feature_class)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Analysis Tools";

        public override string ToolName => "Pairwise Dissolve";

        public override string CallName => "analysis.PairwiseDissolve";

        public override List<string> AcceptEnvironments => ["MDomain", "MResolution", "MTolerance", "XYDomain", "XYResolution", "XYTolerance", "ZDomain", "ZResolution", "ZTolerance", "autoCommit", "configKeyword", "extent", "geographicTransformations", "maintainCurveSegments", "outputCoordinateSystem", "outputMFlag", "outputZFlag", "outputZValue", "parallelProcessingFactor", "qualifiedFieldNames", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _dissolve_field, _statistics_fields, _multi_part.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The features to be aggregated.</para>
        /// <para>要聚合的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The feature class to be created that will contain the aggregated features.</para>
        /// <para>要创建的要素类，该要素类将包含聚合要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Dissolve_Field(s)</para>
        /// <para><xdoc>
        ///   <para>The field or fields on which to aggregate features.</para>
        ///   <para>The Add Field button, which is used only in ModelBuilder, allows you to add expected fields so you can complete the dialog box and continue to build your model.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要聚合要素的一个或多个字段。</para>
        ///   <para>添加字段按钮（仅在模型构建器中使用）可用于添加预期字段，以便完成对话框并继续构建模型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve_Field(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _dissolve_field { get; set; } = null;


        /// <summary>
        /// <para>Statistics Field(s)</para>
        /// <para><xdoc>
        ///   <para>Specifies the numeric field or fields containing the attribute values that will be used to calculate the specified statistic. Multiple statistic and field combinations can be specified. Null values are excluded from all statistical calculations.</para>
        ///   <para>Text attribute fields can be summarized using first and last statistics. Numeric attribute fields can be summarized using any statistic.</para>
        ///   <para>Available statistics types are as follows:</para>
        ///   <bulletList>
        ///     <bullet_item>Sum—The values for the specified field will be added together.</bullet_item><para/>
        ///     <bullet_item>Mean—The average for the specified field will be calculated.</bullet_item><para/>
        ///     <bullet_item>Minimum—The smallest value for all records of the specified field will be found.</bullet_item><para/>
        ///     <bullet_item>Maximum—The largest value for all records of the specified field will be found.</bullet_item><para/>
        ///     <bullet_item>Range—The range of values (maximum minus minimum) for the specified field will be calculated.</bullet_item><para/>
        ///     <bullet_item>Standard deviation—The standard deviation of values in the specified field will be calculated.</bullet_item><para/>
        ///     <bullet_item>Count—The number of values included in the statistical calculations will be found. Each value will be counted except null values. To determine the number of null values in a field, create a count on the field in question, create a count on a different field that does not contain null values (for example, the OID if present), and subtract the two values.</bullet_item><para/>
        ///     <bullet_item>First—The specified field value of the first record in the input will be used.</bullet_item><para/>
        ///     <bullet_item>Last—The specified field value of the last record in the input will be used.</bullet_item><para/>
        ///     <bullet_item>Median—The median for all records of the specified field will be calculated.</bullet_item><para/>
        ///     <bullet_item>Variance—The variance for all records of the specified field will be calculated.</bullet_item><para/>
        ///     <bullet_item>Unique—The number of unique values of the specified field will be counted.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定包含将用于计算指定统计数据的属性值的一个或多个数值字段。可以指定多个统计量和字段组合。空值从所有统计计算中排除。</para>
        ///   <para>可以使用第一个和最后一个统计信息对文本属性字段进行汇总。可以使用任何统计数据对数值属性字段进行汇总。</para>
        ///   <para>可用的统计信息类型如下：</para>
        ///   <bulletList>
        ///     <bullet_item>Sum—指定字段的值将相加。</bullet_item><para/>
        ///     <bullet_item>均值—将计算指定字段的平均值。</bullet_item><para/>
        ///     <bullet_item>最小值—将找到指定字段的所有记录的最小值。</bullet_item><para/>
        ///     <bullet_item>最大值—将找到指定字段的所有记录的最大值。</bullet_item><para/>
        ///     <bullet_item>范围—将计算指定字段的值范围（最大值减去最小值）。</bullet_item><para/>
        ///     <bullet_item>标准差—将计算指定字段中值的标准差。</bullet_item><para/>
        ///     <bullet_item>计数—将找到统计计算中包含的值数。除 null 值外，将计算每个值。若要确定字段中 null 值的数目，请在相关字段上创建计数，在不包含 null 值的其他字段上创建计数（例如，如果存在 OID），然后减去这两个值。</bullet_item><para/>
        ///     <bullet_item>First - 将使用输入中第一条记录的指定字段值。</bullet_item><para/>
        ///     <bullet_item>最后 - 将使用输入中最后一条记录的指定字段值。</bullet_item><para/>
        ///     <bullet_item>中位数—将计算指定字段的所有记录的中位数。</bullet_item><para/>
        ///     <bullet_item>方差—将计算指定字段的所有记录的方差。</bullet_item><para/>
        ///     <bullet_item>唯一 - 将计算指定字段的唯一值数。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Statistics Field(s)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _statistics_fields { get; set; } = null;


        /// <summary>
        /// <para>Create multipart features</para>
        /// <para><xdoc>
        ///   <para>Specifies whether multipart features are allowed in the output feature class.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Specifies multipart features are allowed. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Specifies multipart features are not allowed. Instead of creating multipart features, individual features will be created for each part.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出要素类中是否允许多部分要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 指定允许多部分要素。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 （Unchecked） - 指定不允许多部分要素。将不是创建多部件特征，而是为每个部件创建单独的特征。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Create multipart features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _multi_part_value _multi_part { get; set; } = _multi_part_value._true;

        public enum _multi_part_value
        {
            /// <summary>
            /// <para>MULTI_PART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTI_PART")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>SINGLE_PART</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_PART")]
            [GPEnumValue("false")]
            _false,

        }

        public PairwiseDissolve SetEnv(object MDomain = null, object MResolution = null, object MTolerance = null, object XYDomain = null, object XYResolution = null, object XYTolerance = null, object ZDomain = null, object ZResolution = null, object ZTolerance = null, int? autoCommit = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object outputCoordinateSystem = null, object outputMFlag = null, object outputZFlag = null, object outputZValue = null, object parallelProcessingFactor = null, bool? qualifiedFieldNames = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(MDomain: MDomain, MResolution: MResolution, MTolerance: MTolerance, XYDomain: XYDomain, XYResolution: XYResolution, XYTolerance: XYTolerance, ZDomain: ZDomain, ZResolution: ZResolution, ZTolerance: ZTolerance, autoCommit: autoCommit, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, outputCoordinateSystem: outputCoordinateSystem, outputMFlag: outputMFlag, outputZFlag: outputZFlag, outputZValue: outputZValue, parallelProcessingFactor: parallelProcessingFactor, qualifiedFieldNames: qualifiedFieldNames, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}